package chapter10;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2019/4/13 14:33
 */
class Egg {
    private Yolk y;

    public Egg() {
        System.out.println("New Egg()");
        this.y = new Yolk();
    }

    protected class Yolk {
        public Yolk() {
            System.out.println("Egg.Yolk()");
        }
    }
}

public class BigEgg extends Egg {
    public static void main(String[] args) {
        new BigEgg();
    }

    public class Yolk {
        public Yolk() {
            System.out.println("BigEgg.Yolk()");
        }
    }
}
